package com.example.om_export.app.report.controller;

import com.example.om_export.app.equipment.dao.CustomerMapper;
import com.example.om_export.app.report.dao.ReportTemplateMapper;
import com.example.om_export.app.report.service.CustomerService;
import com.example.om_export.common.utils.LayuiDataGrid;
import com.example.om_export.entity.Customer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/customer")
public class CustomerController {

    @Autowired
    CustomerMapper cm;
    @Autowired
    CustomerService cs;
    @Autowired
    ReportTemplateMapper rtm;

    @RequestMapping(value = "/cFindAll")
    public List<Customer> findAll(){
        List<Customer> cs = cm.findAll();
        return cs;
    }

    @RequestMapping(value = "/findSerach")
    public LayuiDataGrid findSerach(Integer page, Integer limit ,String cCusCode ,String cCusName ,String comCode ,String HospitalType ,String CustTYPE){
        return cs.getPageList(page,limit,cCusCode,cCusName,comCode,HospitalType,CustTYPE);
    }
}
